A data network allows people to communicate with each other and obtain information from various sources on the network, using their respective client devices that are “on” the network. For example, a Web browser application program, running in a user's workstation or laptop computer, can connect with a Web server to download a Web page. The connection may span several intermediate nodes or hops of the network, which may include specialized computers such as routers. These devices can discover routes between the end nodes through which they can forward messages that have been broken up into packets of data. Each node may be assigned a unique or global address, such as an Internet Protocol (IP) address. The Internet is a well known global inter-network in which networks of computers are connected to each other via routers.
Computer network protocols have a layered architecture. Typically, the upper most layer includes the functionality provided by an application program, such as a Web browser. This is the layer that, at least in the end nodes, may initiate a connection between two computers over a network. Thus, for example, a user may select a desired Website on his computer. The Web browser (running in that computer) starts a procedure that results in a connection being made with a server that is associated with the selected Website. The Web browser sends the request “down” through a series of functions referred to as an Internet protocol suite or Transport Control Protocol/Internet protocol (TCP/IP) stack. This stack of protocols is typically implemented in software at its higher layers, often as part of an operating system (OS) program running in the client device. Once the selected Website has been translated into an IP address of a Web server, the server is contacted over the Internet, and an appropriate connection is made with an upper layer program of a similar protocol suite implemented in the Web server.
To use the connection, the TCP/IP stack in the user's computer encapsulates a request message from the Web browser, in this example, a request identifying the Web page. The message may be encapsulated more than once, by several vertical layers on its way down in the protocol stack, including a network access layer. It finally arrives at the lowest layer of the client device, namely the physical layer (which is typically deemed to be a part of the network access layer).
After leaving the physical layer of the user's computer and then making its way through one or more hops in the network, the message from the Web browser arrives in the Web server, and is passed “up” the protocol stack in the Web server to a program that is deemed a peer of the Web browser. The peer program may then respond to the message, by causing the data for the requested Web page to be collected and sent back to the user's computer through the existing network connection. The data is broken up into multiple messages or packets, and is sent in a manner analogous to how the request message was sent.
An application program can have several tasks or processes, that are executed by one or more processors in the user's computer. When the computer is viewed as a time-sharing system, a task executing in foreground is given a higher priority, to use the resources in the computer, than a background task. Typically, the user interacts with only one foreground task per terminal, or terminal window, to minimize confusion. When a user selects a particular window, for example one belonging to an email application, all other tasks that are being executed may become background tasks.
Both foreground and background tasks can access the data network. To access the network, an application program may first request an operating system (OS) in the user's computer to open a connection with the remote server. Once the connection has been opened, the remote server is said to be listening for requests from the OS in the user's computer. The foreground task in the user's computer can now communicate with the remote server. When finished with the foreground task, the application may perform any background tasks it has over the open connection (before signaling the OS to close the connection). As an example, a user finishes reading her new email messages (using an email client application), and then clicks on a Web browser window, to start surfing the Web. The email client, now in background, can periodically check with the remote email server for any new messages, using its open connection.
Each application program typically gets its own port or connection to the network, though they may all share the same lower layer network resources in the user's computer. Thus, referring back to the example given above, while the email program may be mostly dormant from a network activity standpoint once the user has clicked on the Web browser window, network activity resumes when the user clicks on a link to a Web page.